<template>
  <div class="user-center h-100">
    <div class="user-center-header">
      <mt-header fixed title="我的">
        <router-link to="/" slot="left">
          <i class="icon icon-cog"></i>
        </router-link>
        <router-link to="/" slot="right">
          <i class="icon icon-bubbles4"></i>
        </router-link>
      </mt-header>
      <div class="line-h"></div>
      <div class="header-con">
        <div class="user">
          <div class="user-img">
            <img src="http://cmsstatic.dataoke.com//wap_new/user/images/user_info_tx.png?v=201810251604">
          </div>
          <div class="user-info">
            <div class="user-name">gappw</div>
            <div class="user-aq">账号防护中</div>
          </div>
          <div class="user-label">超级会员<i class="icon icon-compass"></i></div>
        </div>
        <div class="btn">
          <div class="panel">
            <div class="val">100</div>
            <div class="name">收藏夹</div>
          </div>
          <div class="panel">
            <div class="val">10</div>
            <div class="name">关注</div>
          </div>
          <div class="panel">
            <div class="val">100</div>
            <div class="name">足迹</div>
          </div>
          <div class="panel">
            <div class="val">100</div>
            <div class="name">积分</div>
          </div>
        </div>
      </div>
    </div>
    <div class="user-con">
      <mt-cell title="我的订单" is-link></mt-cell>
      <mt-cell title="我的收藏" is-link></mt-cell>
      <mt-cell title="浏览记录" is-link></mt-cell>
      <mt-cell title="我的地址" is-link></mt-cell>
      <div class="line-c"></div>
      <mt-cell title="意见反馈" is-link></mt-cell>
      <mt-cell title="帮助中心" is-link></mt-cell>
    </div>
    <div class="tc" @click="setOutLogin" style="text-align: center;padding: 20px;">退出登录</div>
  </div>
</template>

<script>
import {mapActions} from 'vuex';
import { Toast } from 'mint-ui';
import server from '@/api/server/index'

export default {
	name:'keepAlive',
  data() {
    return {}
  },
  methods: {
    ...mapActions([
      'outLogin'
    ]),
    setOutLogin() {
      this.outLogin().then(()=>{
        this.$router.push({path: '/'});
      })
    }
  },
  created() {
    setTimeout(()=>{
      // this.__init();
    },20);
  },
  components: {}
}
</script>
<style lang="less">
  @import '../../common/less/variable';
  .user-center{
    .user-center-header{
      position: relative;
      .mint-header{
        background-color: @color-theme;
        .mint-header-title{
          font-size: @font-size-large;
        }
      }
      .icon{
        color: @color-text-w;
        font-size: @font-size-large;
      }
      height: 200px;
      background-color: @color-theme;
    }
    .line-h{
      height: 40px;
    }
    .header-con{
      padding: 10px 0;
      position: relative;
      .user{
        padding: 0 20px;
        position: relative;
        display: flex;
        color: @color-text-w;
        .user-label{
          position: absolute;
          top: 16px;
          right: 20px;
          background-color: #f3b561;
          color: @color-text-w;
          font-size: @font-size-small;
          font-weight: bold;
          padding: 0 12px;
          border-radius: 20px;
          text-align: right;
          line-height: 30px;
          .icon{
            display: inline-block;
            padding-left: 5px;
            font-weight: bold;
            font-size: @font-size-small;
            margin-top: -2px;
            vertical-align: middle;
          }
        }
        .user-img{
          width: 68px;
          height: 68px;
          img{
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: 4px solid rgba(255,255,255,0.4);
          }
          margin-right: 15px;
        }
        .user-info{
          flex: 1;
          .user-name{
            margin: 10px 0;
          }
          .user-aq{
            display: inline-block;
            background-color: rgba(0,0,0,0.5);
            font-size: @font-size-small;
            color: #fecc2b;
            padding: 4px 6px;
          }
        }
      }
      .btn{
        color: @color-text-w;
        padding-top: 30px;
        display: flex;
        .panel{
          flex: 1;
          text-align: center;
          .val{
            font-size: @font-size-large;
            font-weight: bold;
          }
          .name{
            color: @color-text-w;
            padding-top: 2px;
            font-size: @font-size-small;
          }
        }
      }
    }
    .user-con{
      .mint-cell-wrapper{
        background-image: none;
      }
    }
    .line-c{
      height: 10px;
    }
  }
</style>